<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
async_test(function() {
  var onclose = 0;
  var ws = new WebSocket("ws://wrong_url");

  ws.onclose = this.step_func_done(function(ev) {
      onclose++;
      assert_equals(onclose, 1);
  });
});
</script>
</body>
</html>
